<script src="/frame/jquery/jquery-3.4.1.min.js"></script>
<div class="searchbox_box">
    <input type="file" name="uploadFile" class="uploadPicButton" id="upload_file">
</div>




<script>
    $(".uploadPicButton").change(function () {
        var pic = $('#upload_file')[0].files[0];
        var fd = new FormData();
        fd.append('uploadFile', pic);
        var url = "index.php";
        $.ajax({
            url:url,
            type:"post",
            dataType:"json",
            // Form数据
            data: fd,
            cache: false,
            contentType: false,
            processData: false,
            success:function(data){
                layer.msg(data.msg,function () {
                    window.location.reload();
                });

            }
        });
    });
</script>
